using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CollegeShop.Infrastructure.Entities.Repository;

namespace CollegeShop.Infrastructure.Entities.Entity
{
    public class Payedprovider : IAccessible<T_Payedprovider, Payedprovider>, ILogicEntity<T_Payedprovider, Payedprovider>
    {
        public int ID { get; set; }

        public int PurchaseID { get; set; }

        public decimal PayedMoney { get; set; }

        public DateTime PayedDate { get; set; }

        public string CreateUser { get; set; }

        public DateTime CreateTime { get; set; }

        protected override void Covariant(T_Payedprovider model)
        {
            if (model != null)
            {
                    this.ID = model.ID;
                    this.PurchaseID = model.PurchaseID;
                    this.PayedMoney = model.PayedMoney;
                    this.PayedDate = model.PayedDate;
                    this.CreateUser = model.CreateUser;
                    this.CreateTime = model.CreateTime;
            }
}
        protected override T_Payedprovider Inverter(Payedprovider model)
        {
            if (model != null)
            {
                return new T_Payedprovider()
                {
                    ID = model.ID,
                    PurchaseID = model.PurchaseID,
                    PayedMoney = model.PayedMoney,
                    PayedDate = model.PayedDate,
                    CreateUser = model.CreateUser,
                    CreateTime = model.CreateTime,
                };
            }
            return null;
        }
        public Payedprovider Set(T_Payedprovider dbModel)
        {
            Covariant(dbModel);
            return this;
        }
    }
}
